classDiagram
    class Component {
        <<interface>>
        +operation(): void
    }
    
    class ConcreteComponent {
        +operation(): void
    }

    class Decorator {
        <<abstract>>
        -component: Component
        +Decorator(component: Component)
        +operation(): void
    }

    class ConcreteDecoratorA {
        +operation(): void
        +addedBehaviorA(): void
    }

    class ConcreteDecoratorB {
        +operation(): void
        +addedBehaviorB(): void
    }

    Component <|-- ConcreteComponent : implements
    Component <|-- Decorator : implements
    Decorator <|-- ConcreteDecoratorA : extends
    Decorator <|-- ConcreteDecoratorB : extends

    Decorator --> Component : has a >
